import 'package:flutter/material.dart';

class AppColors extends ThemeExtension<AppColors> {
  final Color? subjectPure;
  final Color? subjectMix1;
  final Color? subjectMix2;
  final Color? subjectMix3;
  final Color? contrastPure;
  final Color? contrastMix1;
  final Color? contrastMix2;
  final Color? contrastMix3;
  final Color? textColour1;
  

  const AppColors({
    this.subjectPure,
    this.subjectMix1,
    this.subjectMix2,
    this.subjectMix3,
    this.contrastPure,
    this.contrastMix1,
    this.contrastMix2,
    this.contrastMix3,
    this.textColour1,
  });

  @override
  AppColors copyWith({
    Color? subjectPure,
    Color? subjectMix1,
    Color? subjectMix2,
    Color? subjectMix3,
    Color? contrastPure,
    Color? contrastMix1,
    Color? contrastMix2,
    Color? contrastMix3,
    Color? textColour1,
  }) {
    return AppColors(
      subjectPure: subjectPure ?? this.subjectPure,
      subjectMix1: subjectMix1 ?? this.subjectMix1,
      subjectMix2: subjectMix2 ?? this.subjectMix2,
      subjectMix3: subjectMix3 ?? this.subjectMix3,
      contrastPure: contrastPure ?? this.contrastPure,
      contrastMix1: contrastMix1 ?? this.contrastMix1,
      contrastMix2: contrastMix2 ?? this.contrastMix2,
      contrastMix3: contrastMix3 ?? this.contrastMix3,
      textColour1: textColour1 ?? this.textColour1,
    );
  }

  @override
  AppColors lerp(ThemeExtension<AppColors>? other, double t) {
    if (other is! AppColors) return this;
    return AppColors(
      subjectPure: Color.lerp(subjectPure, other.subjectPure, t),
      subjectMix1: Color.lerp(subjectMix1, other.subjectMix1, t),
      subjectMix2: Color.lerp(subjectMix2, other.subjectMix2, t),
      subjectMix3: Color.lerp(subjectMix3, other.subjectMix3, t),
      contrastPure: Color.lerp(contrastPure, other.contrastPure, t),
      contrastMix1: Color.lerp(contrastMix1, other.contrastMix1, t),
      contrastMix2: Color.lerp(contrastMix2, other.contrastMix2, t),
      contrastMix3: Color.lerp(contrastMix3, other.contrastMix3, t),
      textColour1: Color.lerp(textColour1, other.textColour1, t),
    );
  }
}
